/*
   Copyright 2011 marcopar@gmail.com

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package eu.flatworld.worldexplorer.gui;

import javax.swing.JLabel;
import javax.swing.JProgressBar;

public class StatusBar extends javax.swing.JPanel {

    public StatusBar() {
        initComponents();
        setStatusProgressBarVisible(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jlStatusLine = new javax.swing.JLabel();
        jpStatusProgress = new javax.swing.JProgressBar();

        setLayout(new java.awt.BorderLayout());

        jlStatusLine.setFont(jlStatusLine.getFont().deriveFont(jlStatusLine.getFont().getStyle() & ~java.awt.Font.BOLD, 10));
        jlStatusLine.setText(" ");
        add(jlStatusLine, java.awt.BorderLayout.CENTER);

        jpStatusProgress.setPreferredSize(new java.awt.Dimension(60, 14));
        add(jpStatusProgress, java.awt.BorderLayout.LINE_END);

    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jlStatusLine;
    private javax.swing.JProgressBar jpStatusProgress;
    // End of variables declaration//GEN-END:variables
    public JLabel getStatusLine() {
        return jlStatusLine;
    }

    public JProgressBar getStatusProgressBar() {
        return jpStatusProgress;
    }

    public void setStatusProgressBarVisible(boolean visible) {
        jpStatusProgress.setVisible(visible);
    }

    public void setStatusText(String text) {
        jlStatusLine.setText(text);
    }
}
